package com.xiaobai.onlinereport.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xiaobai.onlinereport.entity.JimuReportDbField;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * @author dingfeng.xiao
 * @description
 * @date 2024/7/26 14:24
 */
@Mapper
public interface JimuReportDbFieldMapper extends BaseMapper<JimuReportDbField> {

    @Select("SELECT df.*,rb.db_code FROM jimu_report_db_field df join jimu_report_db rb on rb.id = df.jimu_report_db_id " +
            "WHERE rb.jimu_report_id = #{reportId} order by df.order_num")
    List<JimuReportDbField> loadTableHead(@Param("reportId") Long reportId);
}
